#pragma once

#include <string>
#include <iostream>
#include <memory>
#include <fstream>

using namespace std;

namespace CodeMood {
	// A base class that represent the concept of translating
	// one pinyin dictionary to another.
	// It is a virtual base class and it cannot initialize objects.
	class Translator
	{
	public:
		static const int MAX_LINE_LENGTH = 1024;	// static const integral data member
		Translator(){}
		Translator(string infilename);
		Translator(string infilename, string outfilename);
		virtual ~Translator();
		virtual void translate() = 0;
	protected:
		shared_ptr<ifstream> spif_;
		shared_ptr<ofstream> spof_;
	private:
		void init(string infilename, string outfilename);
	};
}

